<form method="post" class="js-ajax-form" action="{:url('open')}">
    <table class="table table-hover table-bordered">
        <thead>
            <tr>
                <th>选择</th>
                <foreach name="fields" item="field">
                <th>{$field.title}</th>
                </foreach>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name="data_list" item="item">
                <tr>
                    <td><input type="checkbox" name="data_ids[{$item.id}]" id="" value="{$item.id}"></td>
                    <foreach name="fields" item="field">
                    <td>{$item[$field["name"]]}</td>
                    </foreach>
                    <td>
                        <foreach name="single_item_actions" item="link">
                            <if condition="$link['target_type']==='exec'">
                            <a href="{:url('open',['action_id'=>$link['id'],'data_id'=>$item['id']])}" class="js-ajax-dialog-btn" data-msg="{$link.describe|default='确认操作？'}">{$link.title}</a>
                            <else/>
                            <a href="{:url('open',['action_id'=>$link['id'],'data_id'=>$item['id']])}">{$link.title}</a>
                            </if>
                        </foreach>
                    </td>
                </tr>
            </foreach>
        </tbody>
    </table>
    <div class="pagination">{$paginate}</div>
    <ul class="well form-inline margin-top-20">
        <foreach name="multi_item_actions" item="link">
        <if condition="$link['target_type']==='exec'">
        <button class="btn btn-primary js-ajax-submit" data-msg="{$link.describe|default='确认操作？'}" name="action_id" value="{$link.id}">{$link.title}</button>
        <else/>
        <button class="btn btn-primary" name="action_id" value="{$link.id}">{$link.title}</button>
        </if>
        </foreach>
    </ul>
</form>
